/*
 * CItemSlot.java
 *
 * Copyright (c) 2009 Giles Millward (Manigra). All rights reserved.
 *
 * This file is part of JRogueDPS.
 *
 * JRogueDPS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * JRogueDPS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with JRogueDPS.  If not, see <http://www.gnu.org/licenses/>.
 */

package geardatabase;

/**
 *
 * @author gmillward
 */
public class CItemSlot {
    public enum ItemSlot {HEAD, NECK, SHOULDERS, BACK, CHEST, WRIST, HANDS, WAIST,
    LEGS, FEET, FINGER, TRINKET, ONEHAND, MAINHAND, OFFHAND, UNKNOWN, FINGER1, FINGER2, TRINKET1, TRINKET2,
    RANGED};

    static public String getItemSlotName(ItemSlot p_itemSlot)
    {
        if (p_itemSlot == ItemSlot.HEAD)
        {
            return "Head";
        } else if (p_itemSlot == ItemSlot.NECK)
        {
            return "Neck";
        } else if (p_itemSlot == ItemSlot.SHOULDERS)
        {
            return "Shoulders";
        } else if (p_itemSlot == ItemSlot.BACK)
        {
            return "Back";
        } else if (p_itemSlot == ItemSlot.CHEST)
        {
            return "Chest";
        } else if (p_itemSlot == ItemSlot.WRIST)
        {
            return "Wrist";
        } else if (p_itemSlot == ItemSlot.HANDS)
        {
            return "Hands";
        } else if (p_itemSlot == ItemSlot.WAIST)
        {
            return "Waist";
        } else if (p_itemSlot == ItemSlot.LEGS)
        {
            return "Legs";
        } else if (p_itemSlot == ItemSlot.FEET)
        {
            return "Feet";
        } else if (p_itemSlot == ItemSlot.FINGER)
        {
            return "Finger";
        } else if (p_itemSlot == ItemSlot.TRINKET)
        {
            return "Trinket";
        } else if (p_itemSlot == ItemSlot.ONEHAND)
        {
            return "One Hand";
        } else if (p_itemSlot == ItemSlot.MAINHAND)
        {
            return "Main Hand";
        } else if (p_itemSlot == ItemSlot.OFFHAND)
        {
            return "Off Hand";
        }

        return "Unknown";
    }

    static public ItemSlot getItemSlot(String p_itemSlotName)
    {
        if (p_itemSlotName.toLowerCase().equals("head"))
        {
            return ItemSlot.HEAD;
        } else if (p_itemSlotName.toLowerCase().equals("neck"))
        {
            return ItemSlot.NECK;
        } else if (p_itemSlotName.toLowerCase().equals("shoulders"))
        {
            return ItemSlot.SHOULDERS;
        } else if (p_itemSlotName.toLowerCase().equals("back"))
        {
            return ItemSlot.BACK;
        } else if (p_itemSlotName.toLowerCase().equals("chest"))
        {
            return ItemSlot.CHEST;
        } else if (p_itemSlotName.toLowerCase().equals("wrist"))
        {
            return ItemSlot.WRIST;
        } else if (p_itemSlotName.toLowerCase().equals("hands"))
        {
            return ItemSlot.HANDS;
        } else if (p_itemSlotName.toLowerCase().equals("waist"))
        {
            return ItemSlot.WAIST;
        } else if (p_itemSlotName.toLowerCase().equals("legs"))
        {
            return ItemSlot.LEGS;
        } else if (p_itemSlotName.toLowerCase().equals("feet"))
        {
            return ItemSlot.FEET;
        } else if (p_itemSlotName.toLowerCase().equals("finger"))
        {
            return ItemSlot.FINGER;
        } else if (p_itemSlotName.toLowerCase().equals("trinket"))
        {
            return ItemSlot.TRINKET;
        } else if (p_itemSlotName.toLowerCase().equals("onehand"))
        {
            return ItemSlot.ONEHAND;
        } else if (p_itemSlotName.toLowerCase().equals("mainhand"))
        {
            return ItemSlot.MAINHAND;
        } else if (p_itemSlotName.toLowerCase().equals("offhand"))
        {
            return ItemSlot.OFFHAND;
        }

        return ItemSlot.UNKNOWN;
    }
}
